<?php
// +----------------------------------------------------------------------
// | 名片应用
// | Author: 张亚 < zhyacn@gmail.com>
// +----------------------------------------------------------------------
namespace app\businesscard\validate;

use think\Validate;

class AdminCardValidate extends Validate {
	protected $rule = [
		'categories' => 'require',
		'name' => 'require',
		'mobile_phone' => 'require|unique:business_card',
	];
	protected $message = [
		'categories.require' => '请指定行业分类！',
		'name.require' => '名片姓名不能为空！',
		'mobile_phone.unique' => '该手机号已经存在！',
	];

	protected $scene = [
		'add' => ['categories,name,mobile_phone'],
		// 'edit' => ['user_login,user_email'],
	];
}